Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rendering | null syntax for nullable values in tooltips #1353

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

baronfel
Copy link
Contributor

@baronfel baronfel commented Feb 2, 2025

Fixes #1352 by checking the nullability information on FSharpType and using that to determine if we should slap a | null on the formatted type.

@baronfel baronfel force-pushed the tooltip-nullability branch from cb2f2be to de0b1ec Compare February 2, 2025 23:55
@baronfel baronfel force-pushed the tooltip-nullability branch from de0b1ec to e38caff Compare February 3, 2025 00:07
@baronfel baronfel force-pushed the tooltip-nullability branch from 34e368c to cfe80b7 Compare February 3, 2025 15:39
@baronfel
Copy link
Contributor Author

baronfel commented Feb 3, 2025

This got really hairy. The code seems to work, but for scripts specifically it requires passing --checknulls+ to the checker manually - there doesn't seem to be an in-script way to light up nullability like #nullable enable. See dotnet/fsharp#17401 for details.

@baronfel
Copy link
Contributor Author

baronfel commented Feb 3, 2025

We may enable nulls for all .NET 9 usage of scripts as a result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hover tooltip does not show nullable values as possibly null
1 participant